﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.Migrations;
using CollegeRevApp.DataModels;

namespace CollegeRevApp.Data
{
    class Seeder
    {
        public static void SeedDb(ApplicationDbContext db)
        {
            db.Colleges.AddOrUpdate(
                x => x.Name,
                new College("Central Washington University", "Ellensburg, WA", "A college in Central Washington with programs focusing on Art, Science and Business.", 5000, 200),
                new College("Western Washington University", "Bellingham, WA", "A Liberal Arts college in the Northwest helping to equip the next generation of educators with the skills they need.", 8000, 350)
                );
            db.SaveChanges();

            db.Reviews.AddOrUpdate(
                x => x.Comment,
                new Review(1, "Really fun time. Good college. Would go again.", Rating.Excellent, Rating.Good, Rating.Great, Rating.Great),
                new Review(1, "Had a hard time figuring out how to register because I'm not very smart. Also, there weren't nearly enough raging parties to go to.", Rating.Great, Rating.Poor, Rating.Good, Rating.Good),
                new Review(1, "Some classes start too early in the morning. The earliest class should be 1:00 pm, imo.", Rating.Excellent, Rating.Great, Rating.Terrible, Rating.Poor),
                new Review(2, "Teachers don't even take attendance or care if you show up at all. Awesome!", Rating.Good, Rating.Excellent, Rating.Terrible, Rating.Poor)
                );

            db.SaveChanges();
        }
    }
}
